package com.cff.common;

import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;

public class SimpleFrame extends JFrame{
	 
    /**
	 * 
	 */
	private static final long serialVersionUID = -8965040903205988354L;
	/*
     *通过调用Toolkit类静态方法getDefaultToolkit得到一个Toolkit对象 ,
     *调用getScreenSize方法,返回屏幕大小
     */
    Toolkit kit = Toolkit.getDefaultToolkit();  
    Dimension screenSize = kit.getScreenSize();
    int screenHeight = screenSize.height;   // 屏幕实际高
    int screenWidth = screenSize.width;     //屏幕实际宽
 
     
    public SimpleFrame () {
        setSize(screenWidth/2,screenHeight/2);  // 设置显示的窗口的大小
    }
    
    public SimpleFrame (int screenHeight,int screenWidth) {
    	setSize(screenHeight,screenWidth);
    }
}